home *** CD-ROM | disk | FTP | other *** search
- Path: magnus.acs.ohio-state.edu!csn!ub!newserve!rebecca!rpi!not-for-mail
- From: Jacek Surazski <jaceks@stud.unit.no>
- Newsgroups: comp.lang.c++,comp.lang.c++.moderated
- Subject: Q: stack corrupted before main()?
- Date: 6 Feb 1996 17:44:35 -0000
- Organization: The Norwegian University of Science and Technology
- Sender: cppmods@netlab.cs.rpi.edu
- Approved: vandevod@cs.rpi.edu
- Message-ID: <4f8423$kp9@netlab.cs.rpi.edu>
- NNTP-Posting-Host: netlab.cs.rpi.edu
- X-Original-Date: 6 Feb 1996 16:41:58 GMT
-
- The project I am currently working on is exhibiting the following behavior: the
- stack is corrupted even before control enters main(). That is, when I run it
- under a debugger and view the stack, it shows names of non-existent functions
- even as the control pointer is still on the main() header. If I try to step
- through the program, the stack shows new non-existant, and occasionally
- existant but incorrect functions, whenever I step into a function in the code.
-
- The project is written for dos, and I am using bc 3.1. I've tried to "boil
- down" the problem to as small a piece of code as possible, but it proved a bit
- bewildering, as no single chunk appeared to be responsible. Removing
- miscelenous bits from here and there seemed to allivate the problem, but these
- bits apparently had nothing in common. I have come to the conclusion, that
- perhaps this is a configuration problem?
-
- I am quite confident that the stack is corrupted before any code (or rather MY
- code) is exectued. I do not, for example, have any global instances of classes,
- whose constructors would be executed before main().
-
- In view of all this I am at a loss what info I could include to make a
- diagnosis easier. The best I can do is to say that the project has a rather
- rich class tree, in which I exploit much virtual inheritence, multiple
- inheritence and abstract classes. Ofcourse, a lot of the methods are virtual.
- Upon this tree I've built a few template classes, which also employ virtual
- functions.
-
- The only aspect of this project that differs from ones I've completed
- previously, I guess, is that I have a class which all the methods are inline,
- ie. it's completely contained in a .h file. I could find no documentation that
- would say that this is a problem. Is it?
-
- If anyone had simmilar problems, or if someone knows of a configuration option
- that might be responsible for this, I'd much appreciate hearing from them.
-
- --------------------------------------
- Jacek Surazski
- email: jaceks@stud.unit.no
- www: http://www.stud.unit.no/~jaceks
- --------------------------------------
-
- [ Articles to moderate: mailto:c++-submit@netlab.cs.rpi.edu ]
- [ Read the C++ FAQ: http://www.connobj.com/cpp/cppfaq.htm ]
- [ Moderation policy: http://www.connobj.com/cpp/guide.htm ]
- [ Comments? mailto:c++-request@netlab.cs.rpi.edu ]
-